#include <rectangle.h>

void
Rectangle::draw (CairoContext *context)
{
	Handler::draw (context);

	//x = controls[0].x;
	//y = controls[0].y;
	//width = controls[1].x - controls[0].x;
	//height = controls[2].y - controls[0].y;

	//cairo_move_to (context, x, y);
	//cairo_line_to (context, x + width, y);
	//cairo_line_to (context, x + width, y + height);
	//cairo_line_to (context, x, y + height);
	//cairo_close_path (context);

	cairo_move_to (context, controls[0].x, controls[0].y);

	for (int i = 1; i < size; i++)
	{
		cairo_line_to (context, controls[i].x, controls[i].y);
	}

	cairo_close_path (context);

	cairo_set_source_rgb (context, 0.0, 0.0, 0.0);
	cairo_stroke (context);
}
